﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using AspxTest.Models;
using Microsoft.ApplicationInsights.Extensibility.Implementation;
using Newtonsoft.Json;
using Wuqi.Webdiyer;

namespace AspxTest
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            AspNetPager1.RecordCount = 600; //总数
        }
        [WebMethod]
        public static string GetString()
        {
            //var result = "测试数据";
            var list = new List<Student>() { new Student() { name = "张三", age = 18 }, new Student() { name = "李四", age = 19 } };
            return JsonConvert.SerializeObject(list);
        }
        [WebMethod]
        public static string GetStringparm(string parm)
        {
            //var result = "测试数据";
            var list = new List<Student>() { new Student() { name = parm, age = 18 }, new Student() { name = "李四", age = 19 } };
            return JsonConvert.SerializeObject(list);
        }
        public string Get()
        {
            return "asas";
        }



        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            var res = sender as AspNetPager;
            var index = res.CurrentPageIndex;//页码
            var size = AspNetPager1.PageSize;
            //获取数据

        }
    }
}